<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnManageProductAttrInDepartmentTable extends AbstractMigration
{
    public function up()
    {
        $this->table('department')
            ->addColumn('is_production', 'enum', ['values' => 'yes,no', 'default' => 'no', 'comment' => '是否生产组'])
            ->addColumn('is_management', 'enum', ['values' => 'yes,no', 'default' => 'no', 'comment' => '是否管理组'])
            ->save();
    }

    public function down()
    {
        $this->table('department')->removeColumn('is_production')->removeColumn('is_management')->save();
    }
}
